package ar.edu.unq.wannaplay;

import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.WebPage;

public class WPPage extends WebPage {

    public WPPage(WebPage page) {
    	this.init(page);
    }

    public void init(WebPage page) {
        this.makeMenu();
        this.makeSidebar();
        this.makePage(page);
        this.makeFooter();
    }

    private void makeMenu() {
    	WebMarkupContainer container = new WebMarkupContainer("menu");
        container.add(new Menu());
    }

    private void makeSidebar() {
    	WebMarkupContainer container = new WebMarkupContainer("sidebar");
    	container.add(new Sidebar());
    }

    protected void makePage(final WebPage page) {
    	WebMarkupContainer container = new WebMarkupContainer("page");
    	container.add(page);
    }

    private void makeFooter() {
        WebMarkupContainer container = new WebMarkupContainer("footer");
        container.add(new Footer());
    }
}
